package com.cn.wanxi.dao;

import com.cn.wanxi.model.NewsModel;

public class NavDao {
//    static NewsModel newsModel;
//    NewsModel a=new NewsModel();
    /**
     * 静态定义数组
     */
    public static final String[] TITLES = {"网站首页", "公司介绍", "新闻介绍", "产品介绍", "在线留言", "联系我们"};
    /**
     * 动态定义数组
     */
    public static final String[] HREFS = new String[6];

    //    下面这段话叫做逻辑代码：逻辑代码不能直接写在类下面，应该写在方法里面
//    因为方法才是去执行，才属于行为
//    HREFS[0]="home.jsp";

    public NavDao() {
    }

    /**
     * 静态方法块
     */
    static {
//        setHrefs();
        HREFS[0] = "/home";
        HREFS[1] = "/company";
        HREFS[2] = "/news";
        HREFS[3] = "/product";
        HREFS[4] = "/online";
        HREFS[5] = "/callus";
    }
    {

    }

    private static void setHrefs() {
        HREFS[0] = "home.jsp";
        HREFS[1] = "company.jsp";
        HREFS[2] = "news.jsp";
        HREFS[3] = "product.jsp";
        HREFS[4] = "online.jsp";
        HREFS[5] = "callus.jsp";
    }

}
